package com.lzg.okrx.adapter

import com.lzy.okgo.adapter.AdapterParam
import com.lzy.okgo.adapter.Call
import com.lzy.okgo.adapter.CallAdapter

import io.reactivex.BackpressureStrategy
import io.reactivex.Flowable

class FlowableBody<T> : CallAdapter<T, Flowable<T>> {

    override fun adapt(call: Call<T>, param: AdapterParam?): Flowable<T> =
        ObservableBody<T>()
            .adapt(call, param)
            .toFlowable(BackpressureStrategy.LATEST)

}
